/*
 * @Author: moonwater 13812995013@163.com
 * @Date: 2025-03-05 14:18:35
 * @LastEditors: moonwater 13812995013@163.com
 * @LastEditTime: 2025-03-05 15:52:02
 * @FilePath: \盐师22Git仓库\day08\Bus.java
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
package day08;

import java.util.Scanner;

public class Bus extends Automobile{
    private int rent;

    public void setRent(int rent) {
        this.rent = rent;
    } 

    public int getRent() {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入巴士的座位数量：" );
        int seat = scanner.nextInt();
        if (seat >0 && seat <= 16) {
            rent = 400;
            System.out.println("巴士每天的租金为：" + rent);
        } else {
            rent = 600;
            System.out.println("巴士每天的租金为：" + rent);
        }
        return rent;
    }

    
}
